package com.ganbo.pattern.template;

/**
 * 模板方法测试类
 *
 * @Author: ganbo
 * @Date: 2020/6/12 14:38
 */
public class TemplateMethodPatternTest {

    public static void main(String[] args) {
        //存钱业务(使用多态)
        AbstractTemplate saveMoney = new SaveMoney();
        saveMoney.templateMethod();

        //取钱业务(使用多态)
        AbstractTemplate takeMoney = new TakeMoney();
        takeMoney.templateMethod();
    }

}
